<template>
  <div class="about-us">
    <h1>About Us</h1>
    <div class="authors">
      <div v-for="(author, index) in authors" :key="index" class="author">
        <img :src="author.avatar" alt="" class="avatar" />
        <div class="info">
          <h2>{{ author.name }}</h2>
          <p>{{ author.intro }}</p>
        </div>
      </div>
    </div>
    <div class="rating">
      <p>请为我们的网站打个分吧(>^ω^<)</p>
      <div class="stars">
        <input value="5" name="rating" id="star5" type="radio">
        <label for="star5"></label>
        <input value="4" name="rating" id="star4" type="radio">
        <label for="star4"></label>
        <input value="3" name="rating" id="star3" type="radio">
        <label for="star3"></label>
        <input value="2" name="rating" id="star2" type="radio">
        <label for="star2"></label>
        <input value="1" name="rating" id="star1" type="radio">
        <label for="star1"></label>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'AboutUsPage',
  data() {
    return {
      authors: [
        {
          avatar: '丛雨.jpg',
          name: '魔王DC',
          intro: '大魔王，无需多言'
        },
        {
          avatar: '芳乃.jpg',
          name: 'van豪',
          intro: '前端偶遇张van豪，年度最佳强如怪物，拼接全力无法战胜'
        },
        {
          avatar: '蕾娜.jpg',
          name: '恐怖行楷',
          intro: '并非全力'
        },
        {
          avatar: '茉子.jpg',
          name: '朕甜橙',
          intro: '𝑪𝒊𝒂𝒍𝒍𝒐～(∠・ω< )⌒★'
        }
      ]
    };
  }
};
</script>

<style scoped>
.about-us {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  font-size: 2em; /* 增大标题字体大小 */
  margin-bottom: 20px;
}

.authors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
}

.author {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.info {
  text-align: left;
}

h2 {
  margin: 0 0 5px 0;
}

p {
  margin: 0;
}

.rating {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.stars {
  display: inline-block;
  margin-left: 10px;
}

.rating input {
  display: none;
}

.rating label {
  float: right;
  cursor: pointer;
  color: #ccc;
  transition: color 0.3s;
}

.rating label:before {
  content: '\2605';
  font-size: 40px; /* 增大星星图标大小 */
}

.rating input:checked ~ label,
.rating label:hover,
.rating label:hover ~ label {
  color: #6f00ff;
  transition: color 0.3s;
}

.rating p {
  font-size: 1.5em; /* 增大打分文字字体大小 */
}
</style>